﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace QLHH
{
    class UsersDAL
    {
        public UsersDAL() {}
        public DataTable DanhSachUsers (string username, string pass)
        {
            SqlConnection conn = new SqlConnection();
            conn.ConnectionString = "Data Source=(local);Initial Catalog=qlvt; User Id=sa; Password=sa";
            conn.Open();
            SqlCommand cmd = new SqlCommand("select * from users where username='"+username+"' and pass='"+pass+"'", conn);
            SqlDataReader dr = cmd.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(dr);
            return dt;
        }
    }
 }
